home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / clipper / nannws14.zip / EMAILS.PRG < prev    next >
Text File  |  1987-04-15  |  878b  |  29 lines

  1.   *** get destination and message   
  2.   ACCEPT "Send to: " TO m_dest   
  3.   ACCEPT "Message: " TO m_text   
  4.   *** call send message procedure   
  5.   DO SENDM WITH m_dest, m_text   
  6.  
  7.   * SENDM Procedure
  8.   * ---------------
  9.  
  10.   * Send message to Netname() specified by parameter 1   
  11.   * Message text is in parameter 2   
  12.   *   
  13.   PROCEDURE SENDM   
  14.     PARAMETER m_dest, m_text   
  15.     PRIVATE m_current   
  16.     *** open Mail file in shared mode (see LOCK.PRG) *** 
  17.     NET_USE("mail", .F. , 0)   
  18.     *** lock file and add blank record *** 
  19.   * FIL_LOCK(0)   
  20.     ADD_REC(0)   
  21.     *** write message and destination *** 
  22.     REPLACE dest WITH m_dest, message WITH m_text   
  23.     *** write other statistics *** 
  24.     REPLACE sender WITH GETE("NETNAME"), sdate WITH DATE(), stime WITH TIME()   
  25.     *** unlock and close *** 
  26.     UNLOCK   
  27.     USE   
  28.     RETURN
  29.